Optimal. Leaf size=47 \[ 2 a^2 \sqrt {x}-\frac {4 a b \tanh ^{-1}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d}-\frac {2 b^2 \cot \left (c+d \sqrt {x}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {4205, 3773, 3770, 3767, 8} \[ 2 a^2 \sqrt {x}-\frac {4 a b \tanh ^{-1}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d}-\frac {2 b^2 \cot \left (c+d \sqrt {x}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3773
Rule 4205
Rubi steps
\begin {align*} \int \frac {\left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx &=2 \operatorname {Subst}\left (\int (a+b \csc (c+d x))^2 \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}+(4 a b) \operatorname {Subst}\left (\int \csc (c+d x) \, dx,x,\sqrt {x}\right )+\left (2 b^2\right ) \operatorname {Subst}\left (\int \csc ^2(c+d x) \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}-\frac {4 a b \tanh ^{-1}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d}-\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int 1 \, dx,x,\cot \left (c+d \sqrt {x}\right )\right )}{d}\\ &=2 a^2 \sqrt {x}-\frac {4 a b \tanh ^{-1}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d}-\frac {2 b^2 \cot \left (c+d \sqrt {x}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.43, size = 93, normalized size = 1.98 \[ \frac {2 a \left (a c+a d \sqrt {x}+2 b \log \left (\sin \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )-2 b \log \left (\cos \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )\right )+b^2 \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )+b^2 \left (-\cot \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.58, size = 94, normalized size = 2.00 \[ \frac {2 \, {\left (a^{2} d \sqrt {x} \sin \left (d \sqrt {x} + c\right ) - a b \log \left (\frac {1}{2} \, \cos \left (d \sqrt {x} + c\right ) + \frac {1}{2}\right ) \sin \left (d \sqrt {x} + c\right ) + a b \log \left (-\frac {1}{2} \, \cos \left (d \sqrt {x} + c\right ) + \frac {1}{2}\right ) \sin \left (d \sqrt {x} + c\right ) - b^{2} \cos \left (d \sqrt {x} + c\right )\right )}}{d \sin \left (d \sqrt {x} + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.96, size = 83, normalized size = 1.77 \[ \frac {2 \, {\left (d \sqrt {x} + c\right )} a^{2} + 4 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) \right |}\right ) + b^{2} \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) - \frac {4 \, a b \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) + b^{2}}{\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.13, size = 62, normalized size = 1.32 \[ 2 a^{2} \sqrt {x}-\frac {2 b^{2} \cot \left (c +d \sqrt {x}\right )}{d}+\frac {4 a b \ln \left (\csc \left (c +d \sqrt {x}\right )-\cot \left (c +d \sqrt {x}\right )\right )}{d}+\frac {2 a^{2} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 52, normalized size = 1.11 \[ 2 \, a^{2} \sqrt {x} - \frac {4 \, a b \log \left (\cot \left (d \sqrt {x} + c\right ) + \csc \left (d \sqrt {x} + c\right )\right )}{d} - \frac {2 \, b^{2}}{d \tan \left (d \sqrt {x} + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.15, size = 111, normalized size = 2.36 \[ 2\,a^2\,\sqrt {x}-\frac {b^2\,4{}\mathrm {i}}{d\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,\sqrt {x}\,2{}\mathrm {i}}-1\right )}-\frac {4\,a\,b\,\ln \left (-\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,4{}\mathrm {i}}{\sqrt {x}}\right )}{d}+\frac {4\,a\,b\,\ln \left (\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,4{}\mathrm {i}}{\sqrt {x}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 8.94, size = 88, normalized size = 1.87 \[ \begin {cases} \frac {2 a^{2} \left (c + d \sqrt {x}\right ) - 4 a b \log {\left (\cot {\left (c + d \sqrt {x} \right )} + \csc {\left (c + d \sqrt {x} \right )} \right )} - 2 b^{2} \cot {\left (c + d \sqrt {x} \right )}}{d} & \text {for}\: d \neq 0 \\- \sqrt {x} \left (- 2 a^{2} - 4 a b \csc {\relax (c )} - 2 b^{2} \csc ^{2}{\relax (c )}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________